package com.frkj.yuan.adapter;
import android.view.ViewGroup;
import androidx.fragment.app.Fragment;
import androidx.fragment.app.FragmentManager;
import androidx.fragment.app.FragmentPagerAdapter;
import com.frkj.yuan.fragment.my.YuyueOrderDetialsFragment;
import com.frkj.yuan.fragment.my.YuyueOrderServiceFragment;
import com.frkj.yuan.fragment.my.YuyueOrderXuzhiFragment;
import java.util.List;
/**
 * 作者：菲菲 on 2022/2/21 16:13
 * company：
 * 丰蓉信息科技有限公司
 */
public class YuyueOrderServiceDetialsAdapter extends FragmentPagerAdapter {
    private List<Fragment> fmList;
    public YuyueOrderServiceDetialsAdapter(FragmentManager fragmentManager, List<Fragment> list) {
        super(fragmentManager);
        fmList = list;
    }
    @Override
    public Fragment getItem(int arg0) {
        if (arg0 == 0) {
            return new YuyueOrderDetialsFragment();
        } else if (arg0 == 1) {
            return new YuyueOrderServiceFragment();
        } else if (arg0 == 2) {
            return new YuyueOrderXuzhiFragment();
        }
        return null;
    }
    @Override
    public int getCount() {
        return fmList.size();
    }
    @Override
    public void destroyItem(ViewGroup container, int position, Object object) {}
}

